﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using AjaxChatService.Models;
using AjaxChatService.YahooMessenger;

namespace AjaxChatService.Controllers
{
    [HttpHeader("Access-Control-Allow-Origin", "*")]
    public class YMContactsController : ApiController
    {
        public IEnumerable<YMContact> GetContacts()
        {
            string sessionId = AuthParameters.SessionId;
            string credentials = AuthParameters.Credentials;
            var helper = new GetContactsHelper();
            //IEnumerable<YMContact> result = helper.ExecuteRequest(sessionId, credentials);
            return helper.ExecuteRequest(sessionId, credentials);
        }
    }
}
